package com.groupbuying.storeinternal.controller;

//import com.groupbuying.common.service.YsRpcService;
//import com.groupbuying.store.service.YinShenService;

import com.groupbuying.storeinternal.utils.apiresult.ApiResultCode;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @anthor wenguoqiang
 * @date: 2019/02/25 14:59
 * @company 够样
 * @des
 **/

@RestController
@RequestMapping("/test")
public class TestContoller {

    //@Autowired
    //private YinShenService yinShenService;

    //@Autowired
    //private YsRpcService ysRpcService;

    @RequestMapping("/getYsUpToken")
    @ResponseBody
    public Object getYsUpToken(){
        //Object obj = yinShenService.getYsUpToken();
        //return obj;
        return null;
    }

    @GetMapping("/getTest")
    @ResponseBody
    public String getTest() {
        try {
            System.out.println("test is right");
            return ApiResultCode.SUCCESS.message();
        } catch (Exception e){
            System.out.println("test is error");
            e.printStackTrace();
        }
        return "this is store";
    }


    @GetMapping("/testYs")
    @ResponseBody
    public String testYs(){
        //Map map = new HashMap<>();
        //map.put("aaa","aaa");
        //System.out.println(ysRpcService.orderPay(map));
        return null;
    }

    /*public static void main(String[] args) {

        System.out.println("");
        Thread.currentThread().getContextClassLoader().getResource("").getPath();
    }*/
}
